/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Model.DAO;

import Model.Beans.Admin;
import java.util.List;

/**
 *
 * @author sixviv
 */
public class AdminDAO extends AbstracDAO<Admin>{

    public Admin getByUser(int id){
        List<Admin> admins = this.buscar("iduser="+id, Admin.class);
        if(admins.isEmpty()){
            return null;
        }else{
            return admins.get(0);
        }
    }

}
